package sample.sub1.section03

class TestMap {
	def show1() {
	  val map = scala.collection.mutable.HashMap[Int,String]();
	  map += (1 -> "AAAA");
	  map += (2 -> "AAAA");
	  map += (3 -> "AAAA");
	  
	  map.foreach{case(k, v) => println("%d:%s".format(k, v))};
	}
	
	def show2() {
	  var map = scala.collection.immutable.HashMap[Int,String]();
	  map += (1 -> "AAAA");
	  map += (1 -> "AAAA");
	  map += (2 -> "AAAA");
	  map += (3 -> "AAAA");
	  
	  map.foreach{case(k, v) => println("%d:%s".format(k, v))};
	}
}